package com.pig4cloud.pigx.strategy.mapstruct;

import com.pig4cloud.pigx.strategy.dto.StrategyContractAddDTO;
import com.pig4cloud.pigx.strategy.dto.StrategyContractEditDTO;
import com.pig4cloud.pigx.strategy.entity.StrategyContract;
import com.pig4cloud.pigx.strategy.vo.StrategyContractAppDetailVO;
import com.pig4cloud.pigx.strategy.vo.StrategyContractVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * StrategyContractStruct
 *
 * @since 2022/11/24 11:37
 */
@Mapper
public interface StrategyContractStruct {
	StrategyContractStruct INSTANCE = Mappers.getMapper(StrategyContractStruct.class);

	/**
	 * addDTO -> entity
	 *
	 * @param dto dto
	 * @return {@link StrategyContract}
	 * @since 2022/2/8
	 */
	StrategyContract addDTO2entity(StrategyContractAddDTO dto);

	/**
	 * editDTO -> entity
	 *
	 * @param dto dto
	 * @return {@link StrategyContract}
	 * @since 2022/2/8
	 */
	StrategyContract editDTO2entity(StrategyContractEditDTO dto);

	/**
	 * list -> VOList
	 *
	 * @param list list
	 * @return {@link List< StrategyContractVO>}
	 * @since 2022/2/8
	 */
	List<StrategyContractVO> list2VOList(List<StrategyContract> list);

	/**
	 * entity -> appDetailVO
	 *
	 * @param entity entity
	 * @return {@link StrategyContractAppDetailVO}
	 * @since 2022/2/8
	 */
	StrategyContractAppDetailVO entity2appDetailVO(StrategyContract entity);

}
